package com.ruoyi.zhjd.laboratory.modules.disconnectRecord.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 工地现场断网记录业务对象 n_site_disconnect_record
 *
 * @author zyb
 * @date 2023-10-13
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class NSiteDisconnectRecordBo extends BaseEntity {

    /**
     * 汇总源表主键
     */
    @NotNull(message = "汇总源表主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 采集设备终端编号
     */
    @NotBlank(message = "采集设备终端编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 数据抽取源表主键
     */
    @NotNull(message = "数据抽取源表主键不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sourceId;

    /**
     * 组编号(32位UUID)
     */
    @NotBlank(message = "组编号(32位UUID)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String groupId;

    /**
     * 组序号
     */
    @NotNull(message = "组序号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long groupNo;

    /**
     * 开机时间
     */
    @NotNull(message = "开机时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date bootTime;

    /**
     * 断网开始时间
     */
    @NotNull(message = "断网开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date disconnectBegin;

    /**
     * 断网结束时间
     */
    @NotNull(message = "断网结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date disconnectEnd;

    /**
     * 断网时长(分钟)
     */
    @NotNull(message = "断网时长(分钟)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long disconnectDuration;

    /**
     * 关机时间
     */
    @NotNull(message = "关机时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date unattendedTime;

    /**
     * 0：已完成记录；-1：开机运行时记录
     */
    @NotNull(message = "0：已完成记录；-1：开机运行时记录不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long send;

    /**
     * 是否正常关机：YES;NO
     */
    @NotBlank(message = "是否正常关机：YES;NO不能为空", groups = { AddGroup.class, EditGroup.class })
    private String isNormalShutdown;

    /**
     * 采集创建时间
     */
    @NotNull(message = "采集创建时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date createDate;

    private String startTime;

    private String endTime;

    private String baseCode;

}
